<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org">

  <title>fscanf</title>
  <link href="../cppreference.css" rel="stylesheet" type="text/css">
</head>

<body>
<table>
  <tr>
  <td>
  <div class="body-content">

  <div class="header-box">
    <a href="../index.html">cppreference.com</a> &gt; <a href=
    "index.html">Standard C I/O</a> &gt; <a href=
    "fscanf.html">fscanf</a>
  </div>

  <div class="name-format">
    fscanf
  </div>

  <div class="syntax-name-format">
    Syntax:
  </div>
  <pre class="syntax-box">
  #include &lt;stdio.h&gt;
  int fscanf( FILE *stream, const char *format, ... );
</pre>

  <p>The function fscanf() reads data from the given file
  <em>stream</em> in a manner exactly like scanf(). The return value of
  fscanf() is the number of variables that are actually assigned
  values, or <strong>EOF</strong> if no assignments could be made.</p>

  <div class="related-name-format">
    Related topics:
  </div>

  <div class="related-content">
    <a href="fgets.html">fgets</a><br>
    <a href="fprintf.html">fprintf</a><br>
    <a href="fputs.html">fputs</a><br>
    <a href="fread.html">fread</a><br>
    <a href="fwrite.html">fwrite</a><br>
    <a href="scanf.html">scanf</a><br>
    <a href="sscanf.html">sscanf</a>
  </div>
  </div>
  </td>
  


  </tr>
  </table>
</body></html>
